package com.xiliu.server.modules.become.service.impl;

import java.util.List;
import java.util.Arrays;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xiliu.server.modules.become.mapper.XlBecomeItemMapper;
import com.xiliu.server.modules.become.entity.XlBecomeItem;
import com.xiliu.server.modules.become.service.IXlBecomeItemService;

/**
 * 房管员认证房源表Service业务层处理
 * 
 * @author xiliu
 * @date 2023-01-04
 */
@Service
public class XlBecomeItemServiceImpl extends ServiceImpl<XlBecomeItemMapper, XlBecomeItem> implements IXlBecomeItemService {
    @Autowired
    private XlBecomeItemMapper xlBecomeItemMapper;

    /**
     * 查询房管员认证房源表
     * @param itemId 房管员认证房源表主键
     * @return 房管员认证房源表
     */
    @Override
    public XlBecomeItem selectXlBecomeItemByItemId(Long itemId) {
        return xlBecomeItemMapper.selectXlBecomeItemByItemId(itemId);
    }

    /**
     * 查询房管员认证房源表列表
     * @param xlBecomeItem 房管员认证房源表
     * @return 房管员认证房源表
     */
    @Override
    public List<XlBecomeItem> selectXlBecomeItemList(XlBecomeItem xlBecomeItem) {
        return xlBecomeItemMapper.selectXlBecomeItemList(xlBecomeItem);
    }

    /**
     * 新增房管员认证房源表
     * @param xlBecomeItem 房管员认证房源表
     * @return 结果
     */
    @Override
    public boolean create(XlBecomeItem xlBecomeItem) {
        return save(xlBecomeItem);
    }

    /**
     * 修改房管员认证房源表
     * @param xlBecomeItem 房管员认证房源表
     * @return 结果
     */
    @Override
    public boolean update(XlBecomeItem xlBecomeItem) {
        return updateById(xlBecomeItem);
    }

    /**
     * 批量删除房管员认证房源表
     * @param itemIds 需要删除的房管员认证房源表主键
     * @return 结果
     */
    @Override
    public int deleteXlBecomeItemByItemIds(Long[] itemIds) {
        return xlBecomeItemMapper.deleteBatchIds(Arrays.asList(itemIds));
    }

    /**
     * 删除房管员认证房源表信息
     * @param itemId 房管员认证房源表主键
     * @return 结果
     */
    @Override
    public int deleteXlBecomeItemByItemId(Long itemId) {
        return xlBecomeItemMapper.deleteById(itemId);
    }
}
